import request from "@/utils/request";
const BASE_URL = "/mock";

const MockAPI = {
  getInstanceList() {
    return request<any, PageResult<IPageVO[]>>({
      url: `${BASE_URL}/liveInstances`,
      method: "get",
    });
  },

  getTopicsByInstanceId(instanceId: string) {
    return request<any, PageResult<string[]>>({
      url: `${BASE_URL}/getInstanceAssignTopics/${instanceId}`,
      method: "get",
    });
  },
  makeUserData(data: any) {
    return request({
      url: `${BASE_URL}/makeUserData`,
      method: "post",
      data: data,
    });
  },
  makeVisitor(data: any) {
    return request({
      url: `${BASE_URL}/makeVisitor`,
      method: "post",
      data: data,
    });
  },
  sendLocationMessage(page: number) {
    return request({
      url: `${BASE_URL}/sendLocationMessage`,
      method: "get",
      params: { page: page },
    });
  },

  sendClearTagMessage() {
    return request({
      url: `${BASE_URL}/sendClearTagMessage`,
      method: "get",
    });
  },

  downloadAllLocationMessage() {
    return request({
      url: `${BASE_URL}/downloadAllLocationMessage`,
      method: "get",
    });
  },
};

export default MockAPI;
export interface IPageVO {
  instanceId: string;
  instanceAssignTopics: number;
  instanceReportDate: Date;
}
